package com.ruoyi.cost.service.impl;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.cost.domain.AccSubject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.cost.mapper.AccVouMapper;
import com.ruoyi.cost.domain.AccVou;
import com.ruoyi.cost.service.IAccVouService;

/**
 * 记账凭证Service业务层处理
 * 
 * @author 王志旸
 * @date 2024-07-09
 */
@Service
public class AccVouServiceImpl  extends ServiceImpl<AccVouMapper,AccVou> implements IAccVouService



{
    @Autowired
    private AccVouMapper accVouMapper;

    /**
     * 查询记账凭证
     * 
     * @param id 记账凭证主键
     * @return 记账凭证
     */
    @Override
    public AccVou selectAccVouById(String id)
    {
        return accVouMapper.selectAccVouById(id);
    }

    /**
     * 查询记账凭证列表
     * 
     * @param accVou 记账凭证
     * @return 记账凭证
     */
    @Override
    public List<AccVou> selectAccVouList(AccVou accVou)
    {
        return accVouMapper.selectAccVouList(accVou);
    }

    /**
     * 新增记账凭证
     * 
     * @param accVou 记账凭证
     * @return 结果
     */
    @Override
    public int insertAccVou(AccVou accVou)
    {
        return accVouMapper.insertAccVou(accVou);
    }

    /**
     * 修改记账凭证
     * 
     * @param accVou 记账凭证
     * @return 结果
     */
    @Override
    public int updateAccVou(AccVou accVou)
    {
        return accVouMapper.updateAccVou(accVou);
    }

    /**
     * 批量删除记账凭证
     * 
     * @param ids 需要删除的记账凭证主键
     * @return 结果
     */
    @Override
    public int deleteAccVouByIds(String[] ids)
    {
        return accVouMapper.deleteAccVouByIds(ids);
    }

    /**
     * 删除记账凭证信息
     * 
     * @param id 记账凭证主键
     * @return 结果
     */
    @Override
    public int deleteAccVouById(String id)
    {
        return accVouMapper.deleteAccVouById(id);
    }

    @Override
    public List<AccVou> selectVouList(String accMode, String accSubName) {
        return accVouMapper.selectVouList(accMode,accSubName);
    }

    @Override
    public List<AccVou> selectVouList1(String accMode) {
        return accVouMapper.selectVouList1(accMode);
    }

    @Override
    public List<AccVou> findByAccVouCodeAndAccVouDate(String accVouCode, String accVouDate) {
        return accVouMapper.findByAccVouCodeAndAccVouDate(accVouCode,accVouDate);
    }

    @Override
    public AccSubject getVouSubType(String subCode) {
        return baseMapper.getVouSubType(subCode);
    }

    @Override
    public List<AccVou> getList(AccVou accVou) {
        return baseMapper.getList(accVou.getAccVouCode(),accVou.getAccVouDate());
    }

    @Override
    public List<Map> getSupListBySpares(ArrayList<String> spares) {
        return baseMapper.getSupListBySpares(spares);
    }

    @Override
    public List<Map> getSupCategory(String accMode, String accSubNum) {
        return baseMapper.getSupCategory(accMode,accSubNum);
    }

    @Override
    public List<Map<String, String>> findSupParent(String accMode) {
        return baseMapper.findSupParent(accMode);
    }

    @Override
    public List<Map<String, String>> findSupChild(String accMode, String customCode) {
        return baseMapper.findSupChild(accMode,customCode);
    }

    @Override
    public String getAllYuE(String accMode, String accSubName, String accBusiness,String spare1) {
        return baseMapper.getAllYuE(accMode,accSubName,accBusiness,spare1);
    }

    @Override
    public List<AccVou> getListCaiWu(AccVou accVou) {
        return baseMapper.getListCaiWu(accVou.getAccVouCode(),accVou.getAccVouDate());

    }

    @Override
    public List<AccVou> getListyusuan(AccVou accVou) {
        return baseMapper.getListyusuan(accVou.getAccVouCode(),accVou.getAccVouDate());

    }

    @Override
    public List<HashMap> findSups(String[] split, String accMode) {
        return baseMapper.findSups(split,accMode);
    }

    @Override
    public List<HashMap> findSupsLoc(String[] supList, String accMode, String[] supSupList) {
        return baseMapper.findSupsLoc(supList,accMode,supSupList);
    }

    @Override
    public List<HashMap> findSupsOne(String[] split, String accMode) {
        return baseMapper.findSupsOne(split,accMode);
    }

    @Override
    public List<HashMap> findSupsLocOne(String[] supList, String accMode, String[] supSupList) {
        return baseMapper.findSupsLocOne(supList,accMode,supSupList);
    }

    @Override
    public List<HashMap> findSupsBySub(String[] supList, String accMode, String accSubName) {
        return  baseMapper.findSupsBySub(supList,accMode,accSubName);
    }

    @Override
    public Map findSpareValue(String assisted_code, String assisted_name, String accMode) {
        return baseMapper.findSpareValue(assisted_code,assisted_name,accMode);
    }


}
